{% extends 'registrar/base.html' %}
{% load staticfiles %}
{% block content %}

        <!-- Page Heading -->
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">
                    Transcript
                    <small>View the grades you received</small>
                </h1>
                <ol class="breadcrumb">
                    <li class="active">
                        <i class="fa fa-file-text"></i> Transcript
                    </li>
                </ol>
            </div>
        </div>
        <!-- /.row -->

        {% if marks.count == 0 %}

        <!-- No Grades Banner -->
        <div class="jumbotron">
            <h1>No Grades</h1>
            <p>
                It appears you have not completed any courses yet. To see your transcript you must complete course.
            </p>
            <p><a href="/courses"
                class="btn btn-primary btn-lg"
                role="button">Find Courses »</a>
            </p>
        </div>
        <!-- /.row -->
        
        {% else %}
       
       <div class="row">
           <div class="col-lg-12">
               <div class="table-responsive">
                   <table class="table table-hover table-striped">
                       <thead>
                           <tr>
                               <th>Course Title</th>
                               <th>Mark</th>
                           </tr>
                       </thead>
                       <tbody>
                       {% for mark in marks %}
                           <tr>
                               <td>{{ mark.course.title }}</td>
                               <td>{{ mark.percent }}%</td>
                           </tr>
                       {% endfor %}
                       </tbody>
                   </table>
               </div>
           </div>
       </div>
       
        {% endif %}

{% endblock content %}
